Skip to main content

ApplyLayout

Applies the specified layout to the current slide. The layout must be in slide master.

Syntax

expression.ApplyLayout(oLayout);

expression - A variable that represents a ApiSlide class.

Parameters

NameRequired/OptionalData typeDefaultDescription
oLayoutRequiredApiLayoutLayout to be applied.

Returns

boolean

Example

This example applies the specified layout to the slide. The layout must be in slide master.

var oPresentation = Api.GetPresentation();
var oSlide = oPresentation.GetSlideByIndex(0);
var oMaster = oPresentation.GetMaster(0);
var oLayout = oMaster.GetLayout(4);
oSlide.ApplyLayout(oLayout);